OPLDatabaseFile LOC::A:\WDR\BJ10SXFX.WDR }j!F" m8 = memory address 2@ Mnamonic: Description: Flags: Instruction: Notes:_ FLAGS: Overflow, Direction, Interrupt Trap, Sign, Zero Auxiliary, Parity, Carry ? = Undefined after op.$* = Changed to reflect result of op. 0 = Always cleared 1 = Always set )ptr16:16 = A far pointer (segment:offset) rel8 = 8 bit relative address%r8 = AL, CL, DL, BL, AH, CH, DH or BH$r16 = AX, CX, DX, BX, SP, BP, SI, DI r = r8 or r16(imm8=signed number between -128 and +127-imm16=signed number between -32768 and +32767 imm = imm8 or imm165m8 = memory addressed by DS:SI or ES:DI in string ops6m16 = memory addressed by DS:SI or ES:DI in string ops r/m = register or memory Sreg = ES, CS, SS or DS Ascii adjust after addition O? S? Z? A* P? C? AAARUsed after ADD, leaves byte result in AL. To convert to ASCII usa OR AL,30H after.7 ASCII adjust before division O? S* Z* A? P* C? ASCII adjust AX after multiply O? S* Z* A? P* C? ASCII adjust after subtraction O? S? Z? A* P? C* Add with carry O* S* Z* A* P* C* ADC r/m,r/imm ADC r,r/m2 O* S* Z* A* P* C* ADD r/m,r/imm ADD r,r/m6 Logical AND O0 S*Z*A?P*C0 AND r/m,r/imm AND r,r/m: Call procedure None CALL r/m16/rel16/ptr16:16/m16:16M Convert byte to word CBW*Extends sign bit of AL into all bits of AH Clear carry flag Clear direction flag CLD&Causes string opps to inc. index regs. Clear interrupt flag Complement carry flag Compare two operands O*S*Z*A*P*C* CMP r/m,r/imm CMP r,r/m Uses SUB on both operands CMPS, CMPSB, CMPSW Compare string operands O*S*Z*A*P*C*"CMPS ( [SI], ES:[DI] ) CMPSB CMPSW:Other compares DS:[SI], ES:[DI]. Subtracting is [SI]-[DI].!Normally used after REPE or REPNEI Convert word to doubleword CWD AX into DX:AX same system as CBW6 DAA Decimal adjust AL after addition O?S*Z*A*P*C* DAS#Decimal adjust AL after subtraction O?S*Z*A*P*C* Decrement by 1 O*S*Z*A*P* DEC r/m!To set the Carry flag use SUB x,1. Stops instruction execution Signed divide O?S?Z?A?P?C? IDIV r/m/Signed divide of AX by r/m : AL = QUO, AH = REM2Signed divide of DX:AX by r/m : AX = QUO, AX = REMq Signed multiply O*S?Z?A?P?C* IMUL r/m AX = AL * r/m DX:AX = AX * r/m&CF and OF are the sign-extend of AL/AX( Input from port IN AL/AX,imm/DXH Increment by 1 O*S*Z*A*P* INC r/m!To set the Carry flag use ADD x,1{ INT / INTO Call to interrupt procedure I0 T0 INTimm INT3=interrupt to debugger!INTO = INT4 if overflow flag is 1D Interrupt return O*D*I*T*S*Z*A*P*C* Return from interrupt vJA,JAE,JB,JBE,JC,JCXZ,JE,JG,JGE,JL,JLE,JNA,JNAE,JNB,JNBE,JNC,JNE,JNG,JNGE,JNL,JNLE,JNO,JNP,JNS,JNZ,JO,JP,JPE,JPO,JS,JZ Jump if condition met Jcc rel82To make far jumps use the opposite jump over a JMP JA - Jump if Above (CF=0 & ZF=0)#JAE - Jump if Above or Equal (CF=0) JB - Jump if Below (CF=1)+JBE - Jump if Below or Equal (CF=1 or ZF=1) JC - Jump if Carry JCXZ - Jump if CX register = 0 JE - Jump if Equal (ZF=1)%JG - Jump if Greater (ZF=0 and SF=OF)&JGE - Jump if Greater or Equal (SF=OF) JL - Jump if Less (SF<>OF)-JLE - Jump if Less or Equal (ZF=1 and SF<>OF)&JNA - Jump if Not Above (CF=1 or ZF=1)(JNAE - Jump if Not Above or Equal (CF=1) JNB - Jump if Not Below (CF=0)1JNBE - Jump if Not Below or Equal (CF=0 and ZF=0) JNC - Jump if Not Carry JNE - Jump if Not Equal (ZF=0)*JNG - Jump if Not Greater (ZF=1 or SF<>OF),JNGE - Jump if Not Greater or Equal (SF<>OF) JNL - Jump if Not Less (SF=OF)1JNLE - Jump if Not Less or Equal (ZF=0 and SF=OF) JNO - Jump if Not Overflow JNP - Jump if Not Parity JNS - Jump if Not Sign JNZ - Jump if Not Zero JO - Jump if Overflow JP - Jump if Parity JPE - Jump if Parity Even (PF=1) JPO - Jump if Parity Odd (PF=0) JS - Jump if Sign JZ - Jump if Zero# JMP rel/r/m/ptr16:16 Loads flags into AH register 7 = Sign 6 = Zero 5 = Indeterminate 4 = Auxiliary 3 = Indeterminate 2 = Parity 1 = Indeterminate 0 = Carry_ LDS, LES Load full pointer LDS/LES r,m16:16-Loads DS:rx or ES:rx with pointer from memory0 Load Effective Address offset LEA rx,m* Assert LOCK# signal prefix LOCKh LODS, LODSB, LODSW Load string operand LODS m ( [SI] ) LODSB LODSW Load [SI] or DS:[SI] into AL/AX "LOOP, LOOPE, LOOPZ, LOOPNE, LOOPNZ Loop control with CX counter LOOP rel8 LOOPcc rel8 DEC CX; jump short if CX=0 In the case of LOOPcc ZF=0 (NE and NZ) ZF=1 (E and Z) MOV Move data NoneWMOV r/m,r/imm MOV r,r/m/imm MOV Sreg,r/m16 MOV r/m16,Sreg MOV AL/AX,moff MOV moff,AL/AX moff = byte/word at (seg:offset)"registers can also be segment regs MOVS, MOVSB, MOVSW Move data from string to string None(MOVS m,m ( [SI] to ES:[DI] ] MOVSB MOVSW1Moves byte/word from [SI] or DS:[SI] into ES:[DI] MUL#Unsigned multiplication of AL or AX O*S?Z?A?P?C* MUL r/m AX = AL * r/m or DX:AX = AX * r/m)CF and OF are cleared if AH or DX is zero3 Two's compliment negation O*S*Z*A*P*C* NEG r/m_ No operation Same as XCHG AX,AX1single byte opcode uses 3 t-states (clock cycles)+ One's compliment negation NOT r/m; Logical inclusive OR O0S*Z*A?P*C0 OR r/m,r/imm OR r,r/m) Output to port OUT imm/DX,AL/AXW Pop a word from the stack POP m/r/Sreg (Only words) Use RET instead of POP CS@ POPF"Pop from stack into FLAGS register O*D*I*T*S*Z*A*P*C* POPFA Push operand onto the stack PUSH m/r/Sreg (only words)4 PUSHF"Push FLAGS register onto the stack PUSHF RCL, RCR, ROL, ROR Rotate with or without CF O*C*;RCL r/m,imm/CL RCR r/m,imm/CL ROL r/m,imm/CL ROR r/m,imm/CL.RCL and RCR rotate 9 or 17 bits (including CF)%ROL and ROR rotates only 8 or 16 bitsQ REP, REPE, REPZ, REPNE, REPNZ!Repeat following string operation Z*3REP MOVS REP STOS REPE/REPNE CMPS REPE/REPNE SCAS REPZ = REPE and REPNZ = REPNE*1. Check CX, if zero goto next instruction 2. Perform string op once&3. Decriment CX, no flags are modifiedE4. Check ZF for SCAS or CMPS, exit if REPE and ZF=0 or REPNE and ZF=1 5. Goto 1Q Return from procedure RET imm16#RET imm POPs imm bytes of the stack> Store AH into Flags S*Z*A*P*C* SF ZF x AF x PF x CF SAL, SAR, SHL, SHR Shift instructions O*S*Z*A?P*C*;SAL r/m,imm/CL SAR r/m,imm/CL SHL r/m,imm/CL SHR r/m,imm/CL SAL = SHL, MSB goes to CF, LSB=0ISAR and SHR, LSB -> CF, with SAR the MSB is unchanged, with SHR the MSB=0I Integer subtraction with borrow O*S*Z*A*P*C* SBB r/m,r/imm SBB r,r/mc SCAS, SCASB, SCASW Compare string data O*S*Z*A*P*C* SCAS m SCASB SCASW Compares AL/AX with ES:[DX] Set Carry Flag Set Direction Flag STD&Causes string opps to dec. index regs.% Set Interrupt enable Flag STOS, STOSB, STOSW Store string data STOS m STOSB STOSW Stores AL/AX in ES:[DI]= Integer subtraction O*S*Z*A*P*C* SUB r/m,imm/r SUB r,r/mS Logical compare O0S*Z*A?P*C0 TEST r/m,r/imm!Uses logical AND on both operands7 WAIT'Wait until BUSY# pin is inactive (high) WAITG XCHG&Exchange memory/register with register XCHG r/m,r XCHG r,r/mc XLAT, XLATB Table look-up translation XLAT m8 XLATB)Set AL to memory byte DS:[BX+unsigned AL]> Logical Exclusive OR O0S*Z*A?P*C0 XOR r/m,r/imm XOR r,r/m